import Vue from 'vue'
import Router from 'vue-router'
// import Hello from '@/components/Hello'
import Home from './../pages/home/home.vue'
import Login from './../pages/login/login.vue'

// 子系统相关
import sub from '../pages/subsystem/sub.vue'
import subsystemShow from '../pages/subsystem/sub_show.vue'
import subsystemSet from '../pages/subsystem/sub_set.vue'
import subsystemEnclosure from '../pages/subsystem/sub_enclosure.vue'
import subsystemUI from '../pages/subsystem/sub_ui.vue'
import subsystemUsers from '../pages/subsystem/sub_users.vue'
import subsystemRestart from '../pages/subsystem/sub_restart.vue'
import subsystemShutdown from '../pages/subsystem/sub_shutdown.vue'
import subsystemWizard from '../pages/subsystem/sub_wizard.vue'

// 控制器相关
import ctrl from '../pages/controller/ctrl.vue'
import controllerShow from '../pages/controller/controller_show.vue'
import controllerLog from '../pages/controller/controller_log.vue'
import controllerSet from '../pages/controller/controller_set.vue'
import controllerRestart from '../pages/controller/controller_restart.vue'
import controllerShutdown from '../pages/controller/controller_shutdown.vue'
import controllerUpdate from '../pages/controller/controller_update.vue'

// 附件
import encl from '../pages/enclosures/encl.vue'
import enclosureShow from '../pages/enclosures/enclosure_show.vue'
import enclosureSet from '../pages/enclosures/enclosure_set.vue'
import enclosureLocate from '../pages/enclosures/enclosure_locate.vue'
import enclosureManage from '../pages/enclosures/enclosure_manage.vue'
import enclosureRestart from '../pages/enclosures/enclosure_restart.vue'
import enclosureUpdate from '../pages/enclosures/enclosure_update.vue'

// 物理盘
import phy from '../pages/physical_disk/phy.vue'
import phyAssign from '../pages/physical_disk/phy_assign.vue'
import phyCounter from '../pages/physical_disk/phy_counter.vue'
import phyError from '../pages/physical_disk/phy_error.vue'
import phyFormat from '../pages/physical_disk/phy_format.vue'
import phyLocate from '../pages/physical_disk/phy_locate.vue'
import phyManage from '../pages/physical_disk/phy_manage.vue'
import phyRemove from '../pages/physical_disk/phy_remove.vue'
import phyShow from '../pages/physical_disk/phy_show.vue'
import phyUpdate from '../pages/physical_disk/phy_update.vue'

// 存储池
import pool from '../pages/pool/pool.vue'
import poolClear from '../pages/pool/pool_clear.vue'
import poolDelete from '../pages/pool/pool_delete.vue'
import poolExport from '../pages/pool/pool_export.vue'
import poolImport from '../pages/pool/pool_import.vue'
import poolLocate from '../pages/pool/pool_locate.vue'
import poolMove from '../pages/pool/pool_move.vue'
import poolSet from '../pages/pool/pool_set.vue'
import poolCreate from '../pages/pool/pool_create.vue'
import poolShow from '../pages/pool/pool_show.vue'
import poolVerify from '../pages/pool/pool_verify.vue'

// 虚拟盘
import virtual from '../pages/virtual_disk/vir.vue'
import virCreate from '../pages/virtual_disk/vir_create.vue'
import virDelete from '../pages/virtual_disk/vir_delete.vue'
import virLocate from '../pages/virtual_disk/vir_locate.vue'
import virSet from '../pages/virtual_disk/vir_set.vue'
import virShow from '../pages/virtual_disk/vir_show.vue'

// 应用
import application from '../pages/application/application.vue'
import appCounter from '../pages/application/application_counter.vue'
import appCreate from '../pages/application/application_create.vue'
import appDelete from '../pages/application/application_delete.vue'
import appError from '../pages/application/application_error.vue'
import appImport from '../pages/application/application_import.vue'
import appManage from '../pages/application/application_manage.vue'
import appSet from '../pages/application/application_set.vue'
import appShow from '../pages/application/application_show.vue'

// SFX
import sfx from '../pages/sfx/sfx.vue'
import sfxAssign from '../pages/sfx/sfx_assign.vue'
import sfxCreate from '../pages/sfx/sfx_create.vue'
import sfxDelete from '../pages/sfx/sfx_delete.vue'
import sfxExtent from '../pages/sfx/sfx_extent.vue'
import sfxManage from '../pages/sfx/sfx_manage.vue'
import sfxPrefetch from '../pages/sfx/sfx_prefetch.vue'
import sfxShow from '../pages/sfx/sfx_show.vue'

Vue.use(Router)

export default new Router({
  linkActiveClass: 'active',
  routes: [
    {
      path: '/',
      redirect: '/login'
    },
    {
      path: '/home',
      name: 'Home',
      component: Home
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    },
    {
      path: '/sub',
      name: 'subsystem_settings',
      component: sub,
      children: [
        {
          path: 'sub_show',
          component: subsystemShow
        }, {
          path: 'sub_set',
          component: subsystemSet
        }, {
          path: 'sub_enclosure',
          component: subsystemEnclosure
        }, {
          path: 'sub_ui',
          component: subsystemUI
        }, {
          path: 'sub_users',
          component: subsystemUsers
        }, {
          path: 'sub_restart',
          component: subsystemRestart
        }, {
          path: 'sub_shutdown',
          component: subsystemShutdown
        }, {
          path: 'sub_wizard',
          component: subsystemWizard
        }
      ]
    },
    {
      path: '/ctrl',
      name: 'ctrl',
      component: ctrl,
      children: [
        {
          path: 'controller_show',
          component: controllerShow
        }, {
          path: 'controller_log',
          component: controllerLog
        }, {
          path: 'controller_set',
          component: controllerSet
        }, {
          path: 'controller_restart',
          component: controllerRestart
        }, {
          path: 'controller_shutdown',
          component: controllerShutdown
        }, {
          path: 'controller_update',
          component: controllerUpdate
        }
      ]
    },
    {
      path: '/encl',
      name: 'encl',
      component: encl,
      children: [
        {
          path: 'enclosure_show',
          component: enclosureShow
        }, {
          path: 'enclosure_set',
          component: enclosureSet
        }, {
          path: 'enclosure_locate',
          component: enclosureLocate
        }, {
          path: 'enclosure_manage',
          component: enclosureManage
        }, {
          path: 'enclosure_restart',
          component: enclosureRestart
        }, {
          path: 'enclosure_update',
          component: enclosureUpdate
        }
      ]
    },
    {
      path: '/phy',
      name: 'phy',
      component: phy,
      children: [
        {
          path: 'phy_show',
          component: phyShow
        },
        {
          path: 'phy_assign',
          component: phyAssign
        },
        {
          path: 'phy_counter',
          component: phyCounter
        },
        {
          path: 'phy_error',
          component: phyError
        },
        {
          path: 'phy_format',
          component: phyFormat
        },
        {
          path: 'phy_locate',
          component: phyLocate
        },
        {
          path: 'phy_manage',
          component: phyManage
        },
        {
          path: 'phy_remove',
          component: phyRemove
        },
        {
          path: 'phy_update',
          component: phyUpdate
        }
      ]
    },
    {
      path: '/pool',
      name: 'pool',
      component: pool,
      children: [
        {
          path: 'pool_clear',
          component: poolClear
        }, {
          path: 'pool_delete',
          component: poolDelete
        }, {
          path: 'pool_export',
          component: poolExport
        }, {
          path: 'pool_import',
          component: poolImport
        }, {
          path: 'pool_locate',
          component: poolLocate
        }, {
          path: 'pool_move',
          component: poolMove
        }, {
          path: 'pool_set',
          component: poolSet
        }, {
          path: 'pool_show',
          component: poolShow
        }, {
          path: 'pool_verify',
          component: poolVerify
        }, {
          path: 'pool_create',
          component: poolCreate
        }
      ]
    },
    {
      path: '/virtual',
      name: 'virtual',
      component: virtual,
      children: [
        {
          path: 'vir_create',
          component: virCreate
        }, {
          path: 'vir_delete',
          component: virDelete
        }, {
          path: 'vir_locate',
          component: virLocate
        }, {
          path: 'vir_set',
          component: virSet
        }, {
          path: 'vir_show',
          component: virShow
        }
      ]
    },
    {
      path: '/application',
      name: 'application',
      component: application,
      children: [
        {path: 'app_counter', component: appCounter},
        {path: 'app_create', component: appCreate},
        {path: 'app_delete', component: appDelete},
        {path: 'app_error', component: appError},
        {path: 'app_import', component: appImport},
        {path: 'app_manage', component: appManage},
        {path: 'app_set', component: appSet},
        {path: 'app_show', component: appShow}
      ]
    },
    {
      path: '/sfx',
      name: 'sfx',
      component: sfx,
      children: [
        {path: 'sfx_assign', component: sfxAssign},
        {path: 'sfx_create', component: sfxCreate},
        {path: 'sfx_delete', component: sfxDelete},
        {path: 'sfx_extent', component: sfxExtent},
        {path: 'sfx_manage', component: sfxManage},
        {path: 'sfx_prefetch', component: sfxPrefetch},
        {path: 'sfx_show', component: sfxShow}
      ]
    }
  ]
})
